<%@ page import="java.util.Vector" %>
<%@ page import="com.entity.Cost" %>
<%@ page import="com.service.DoctorService" %>
<%@ page import="com.service.PatientService" %>
<%@ page import="com.entity.Doctor" %>
<%@ page import="com.entity.Patient" %><%--
  Created by IntelliJ IDEA.
  User: 95241
  Date: 2021/9/21
  Time: 16:18
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
    <title>缴费记录</title>

    <link rel="stylesheet" type="text/css" href="css/deal.css">

</head>
<body style="background-color: #EBECF0">
<br>
<br>

<h2 style="margin-left: 15%">缴费记录</h2>
<br>

<hr align=center width="70%" SIZE=3>
<br>
<br>
<center>
<table border="1" cellspacing="0" width=70% cellpadding="20">
    <tr bgcolor="#a9a9a9">
        <th align="center">编号</th>
        <th align="center">缴费日期</th>
        <th align="center">缴费药品单</th>
        <th align="center">费用</th>
        <th align="center">是否缴费</th>
    </tr>

    <%
        Vector<Cost> costs = (Vector<Cost>) request.getAttribute("patientCosts");
        Cost cost;
        DoctorService doctorService = new DoctorService();
        PatientService patientService = new PatientService();
        if(costs!=null){
            int size = costs.size();
            while (size>0){
                cost = costs.get(size-1);
                Patient patient = patientService.findThisPatient(cost.getPatientAccount());
                if(cost!=null){
    %>

    <tr>
        <td align="center"><%=cost.getId()%></td>
        <td align="center"><%=cost.getCostDate()%></td>
        <td align="center"><%=cost.getDrugId()%></td>
        <td align="center"><%=cost.getCost()%></td>
        <td align="center"><%=cost.getIsCostString()%></td>
    </tr>
        <%

                }
                size-=1;
            }
        }
        %>

</table>
    <br>
    <br>
    <a href="patientServlet?operation=homePage"><input type="button" value="返回" class="sub"></a>
</center>
</body>
</html>
